import logging,yaml,yagmail

def email(qq):
    y=yagmail.SMTP(user='2314336117@qq.com',password='ixpbgkkezjwodhif',host='smtp.qq.com')
    y.send(to='2314336117@qq.com',subject='yuekao',contents='manfen',attachments=qq)

def log_set():
    logging.basicConfig(filename='giao.txt',filemode='w+',format='%(asctime)s -> %(msecs)d -> %(message)s',level=logging.DEBUG)

def get_data_from_yaml(filename):
    with open(filename,'r',encoding='utf-8')as f:
        return yaml.safe_load(f)